i = 1
s = 0
while i != 0:
  i = int(input())
  s += i
print (s)
